Search 페이지 기본 로직 작성 with RTK Query#67
Merged
hanana1253 merged 9 commits intoTeamCooks:developfrom Mar 31, 2022
Merged
Conversation
참고: https://nextjs.org/docs/messages/next-image-unconfigured-host unconfigured host로 된 static 서버에 image를 요청할 수 없는 문제 해결
- currentPage 바꾸는 핸들러 추가
- or로 해야할 것을 and로 해놨던 실수가 있었습니다. - $hide 프롭을 isloading || hideHeader로 변경
- 1페이지는 SSR로, 2번부터는 CSR로 가져와 렌더링하는 로직 추가 - 첫 페이지에서 fetching 못하게 하려다보니 코드가 다소 난잡해져서 리팩토링 필요 - currentPage에서 바뀌어도 리스트가 렌더링되지 않는 기현상 발생 TODO: - current page 바뀌면 리스트 업데이트 - CardList 컴포넌트 만들 필요
Member
Author
|
#53 이슈와도 연관이 있군요 |
hanana1253
commented
Mar 30, 2022
| return config; | ||
| }, | ||
| images: { | ||
| domains: ['spoonacular.com'], |
Member
Author
There was a problem hiding this comment.
https://nextjs.org/docs/messages/next-image-unconfigured-host
unfigured host 문제로 config 파일 수정했어요
Member
Author
There was a problem hiding this comment.
https://nextjs.org/docs/basic-features/image-optimization#remote-images
외부 서버 이미지 가져오는 경우에 대한 공식문서 자료도 읽어보면 도움이 되네요!
- RTK 쿼리로 isFetching 상태 시 로딩 컴포넌트 노출 - currentResults에 대해서 data가 바뀔 때 적용, 렌더링하도록 변경
- 타입정의만 하고 prop에 적용을 안해서 적어두었습니다.
- 이제 authStatus를 firebase로부터 가져와 추가합니다.
- withRouter를 통해 path가 '/'이고 링크를 통해 접근하는 경우 hasError 값을 false로 초기화
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
What kind of change does this PR introduce?
Related Issues
#62
#38
What does this PR do?
Other information